#ifndef N1LOCK_H_2009_09_28
#define N1LOCK_H_2009_09_28

#include "N1Object.h"

class N1Lock : public N1Object 
{
#ifdef WINDOWS
    CRITICAL_SECTION cs;
#else
    pthread_mutex_t  m_mutex;
#endif

public:
    N1NAME_DECL

    N1Lock();
    N1Lock(uint32 spin);
    virtual ~N1Lock();

    void lock();
    void unlock();
};

#endif //N1LOCK_H_2009_09_28
